<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class WaterStorageShop extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('water_storage_shop', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8mb4';
             $table->collation = 'utf8mb4_unicode_ci';
            // CONTENT
            $table->integer('water_storage_id')->nullable(false)->comment('入库编号');
			$table->integer('water_shop_id')->nullable(false)->comment('商品编号');
			$table->integer('num')->nullable(false)->default(0)->comment('入库数量');
			$table->integer('price')->nullable(false)->default(0)->comment('单价');
			$table->primary(['water_storage_id','water_shop_id']);
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('water_storage_shop');
    }
}
